﻿<UserControl x:Class="Tisbi.LawFirm.UI.Views.Controls.Forms.AppealsCRUDForm"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:bl="clr-namespace:Tisbi.LawFirm.BL;assembly=Tisbi.LawFirm.BL"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="380">
    <ScrollViewer>
        <StackPanel Orientation="Vertical">
            <StackPanel.Resources>
                <Style TargetType="StackPanel">
                    <Setter Property="Orientation" Value="Horizontal" />
                    <Setter Property="Margin" Value="0,0,0,4" />
                </Style>
            </StackPanel.Resources>
            <StackPanel>
                <Label Content="№:" Target="{Binding ElementName=TextUuid}"/>
                <TextBox x:Name="TextUuid" Text="{Binding Path=Model.Id}" IsReadOnly="True" Background="LightGray"/>
            </StackPanel>
            <StackPanel>
                <Label Content="Тип жалобы:" />
                <ComboBox ItemsSource="{Binding Path=AppealsTypes}" SelectedItem="{Binding Path=SelectedAppealsType, Mode=TwoWay}" />
            </StackPanel>
            <StackPanel>
                <Label Content="Название:" />
                <TextBox Text="{Binding Path=Title, Mode=TwoWay, ValidatesOnDataErrors=True}" />
            </StackPanel>
            <StackPanel>
                <Label Content="Дата рассмотрения:"  />
                <DatePicker>
                    <DatePicker.Text>
                        <Binding Path="SelectedHearingDate" Mode="TwoWay">
                            <Binding.Converter>
                                <bl:DateConverter />
                            </Binding.Converter>
                        </Binding>
                    </DatePicker.Text>
                </DatePicker>
            </StackPanel>
            <StackPanel>
                <Label Content="Результат рассмотрения:" />
                <TextBox Text="{Binding Path=Model.ResultOffAppeals, Mode=TwoWay}" />
            </StackPanel>
            <StackPanel>
                <Label Content="Место рассмотрения:" />
                <ComboBox ItemsSource="{Binding Path=Locations}" SelectedItem="{Binding Path=SelectedLocation, Mode=TwoWay}" DisplayMemberPath="Title" />
            </StackPanel>
        </StackPanel>
    </ScrollViewer>
</UserControl>
